package com.ai.dmc.index.web.bean;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 表头 
 */
public class TblCell {

    private int colspan;
    private int rowspan;

    private String alias;

    public TblCell(String alias) {
        this.alias = alias;
        this.colspan = 1;
        this.rowspan = 1;
    }

    public TblCell(String alias, int colspan, int rowspan) {
        this.alias = alias;
        this.colspan = colspan < 1 ? 1 : colspan;
        this.rowspan = rowspan < 1 ? 1 : rowspan;
    }

    public int getColspan() {
        return colspan;
    }

    public void setColspan(int colspan) {
        this.colspan = colspan;
    }

    public int getRowspan() {
        return rowspan;
    }

    public void setRowspan(int rowspan) {
        this.rowspan = rowspan;
    }


    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
